<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/common/taglib.jsp" %>

<script>
//# sourceURL=orgPersonGrid.js

var selPersonId = null;
var selPersonName = null;
var selPerson_isMainPos = null;
var selRelateOrgId = null;

$(document).ready(function() {

	// 选择表格行
	$("#gridPerson table > tbody > tr").click(function() {
		$("#gridPerson table > tbody > tr").removeClass('info');
		$(this).addClass('info');
		selPersonId = $(this)[0].id;
		selPersonName = $(this).find("td").eq(1).text();
		selPerson_isMainPos = $(this).find("td").eq(4).text() == '是' ? true : false;
		selRelateOrgId = $(this).find("td").eq(6).text();
		//alert(selRelateOrgId);
	});

});

</script>

<div id="gridPerson" class="table-responsive">
	<table class="table table-hover table-bordered">
	   <thead>
	     <tr>        
	       <th>登录名</th>
	       <th>姓名</th>
	       <th>编码</th>	        
	       <th>组织路径</th>
	       <th>是否主岗</th>
		   <th>状态</th>
		   <th style="display:none;">关联列</th>        
	     </tr>
	   </thead>
	   <tbody>
		<c:forEach items="${listPerson}" var="node" varStatus="status">		
			<tr id='${node.personId}'>
			<td>${node.loginName}</td>			
			<td>${node.name}</td>
			<td>${node.code}</td>
			<td>${node.relateOrgPath}</td>
			<td>${node.isMainPos ? '是' : '否' }</td>
			<td>${node.displayValidState}</td>
			<td style="display:none;">${node.relateOrgId}</td>
			</tr>
		</c:forEach>	
	   </tbody>
	</table>
</div>

<%@ include file="/WEB-INF/view/common/bootstrapPage.jsp" %>
